<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Vue.js - v-model</title>
    </head>

    <body>
        <script src="./Vue2/vue.js"></script>
        <div id="app">
            <input type="text" v-model="username" placeholder="Username">
            <br>
            <input type="password" v-model="password" placeholder="Password">
            <br>
            <button @click="login">Login</button>
            <button @click="reset">Reset</button>
        </div>
        <script>
            const app = new Vue({
                el: "#app",
                data: {
                    username: '',
                    password: ''
                },
                methods: {
                    login() {
                        console.log(this.username, this.password)
                    },
                    reset() {
                        this.username = ''
                        this.password = ''
                    }
                },
            })
        </script>
    </body>
</html>